@extends('front.layout')
@section('title','往期视频详情页')
@section('head')
    <div class="nav">
        <ul class="nav_body">
            <li><a href="/">首页</a></li>
            <li><a href="/conf">名家讲堂</a></li>
            <li><a href="/expert">名家风采</a></li>
            <li><a href="/review" class="current">往期视频</a></li>
        </ul>
    </div>
@endsection
@section('content')
<div class="main">
    <?php
    function curPageURL() {
        $pageURL = 'http';
        error_reporting(0);
        if ($_SERVER["HTTPS"] == "on") {    // 如果是SSL加密则加上“s”
            $pageURL .= "s";
        }
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80") {
            $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
        } else {
            $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
        }
        return $pageURL;
    }
    include ("./phpqrcode/phpqrcode.php");
    function getQRcode($data,$outfile){
        $Qrcode=new QRcode();
        $Qrcode->png($data,$outfile,'L',10);//前两个参数：文字（二维码的内容） 输出路径
    }
    $data=curPageURL();
    $outfile="./assets/images/xiangqing.png";
    getQRcode($data,$outfile);
    ?>
    <div class="past_top clearfix">
        <div class="past_left">
            <div class="past_left_title">{{$video->title}}</div>
            <div class="past_left_video">
                <div class="video" style="width: 600px;height: 400px;"></div>
                <script type="text/javascript">
                    //定义一个变量：videoObject，用来做为视频初始化配置
                    var videoObject = {
                        container: '.video', //“#”代表容器的ID，“.”或“”代表容器的class
                        video: '{{$video->url}}'//视频地址
                    };
                    new ckplayer(videoObject);//初始化播放器
                </script>
            </div>
            <div class="online_class_share">
                <span>分享到：</span>
                <a href="javascript:void(show())"><img src="/assets/images/icon_weixin.jpg" /></a>
            </div>
        </div>
        <div class="past_right">
            <div class="past_intro">
                <div class="title_box">本期简介</div>
                <div class="past_intro_body">
                    <p>{{$video->content}}</p>
                </div>
            </div>
            @if(isset($oVideos[0]))
            <div class="past_other">
                <div class="past_other_title">其他讲堂</div>
                <div class="past_other_list">
                    <div class="past_other_ship">
                        <a href="/review/review-info/{{$oVideos[0]->id}}"><img src="/assets/test_images/r1.jpg" /></a>
                    </div>
                </div>
            </div>
            @endif
        </div>
    </div>
    <div class="past_export">
        @foreach($video->lecture as $v)
        <div class="title_box">本期嘉宾</div>
        <div class="export_this_list">
            <div class="export_this_ship clearfix">
                <div class="left_export"><img src="{{$v->thumb}}"/></div>
                <div class="right_export">
                    <div class="export_base">
                        <p class="name">{{$v->name}} {{$v->position}}</p>
                        <p><b>科室：</b>{{$v->department}}</p>
                        <p><b>职称：</b>{{$v->job_name}}</p>
                    </div>
                    <div class="export_this_intro">
                        <p>{{$v->introduction}}</p>
                        <div class="export_edu clearfix">
                            <div class="edu_title">接受教育：</div>
                            <div class="edu_info">
                                <p>{{$v->education}}</p>
                                <p><a href="/expert/expert-info/{{$v->id}}">【详情】</a></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        @endforeach
    </div>
    <!--微信分享弹窗-->
    <div class="shadow" id="shadow" style="display:none"></div>
    <div class="chat_pop" style="display:none" id="chat_pop">
        <div class="chat_pop_top"><a href="javascript:void(hide())" class="chat_pop_close"></a></div>
        <div class="chat_pop_body">
            <img src="/assets/images/xiangqing.png" />
            <p>使用微信扫一扫，并将网页分享给好友</p>
        </div>
    </div>
</div>
@endsection


